﻿using System;
using SharpSqlAnalyzer.nodes.hive;
using SharpSqlAnalyzer.nodes.mssql;
using SharpSqlAnalyzer.nodes.teradata;
using SharpSqlAnalyzer.stmt;
using SharpSqlAnalyzer.stmt.db2;
using SharpSqlAnalyzer.stmt.hive;
using SharpSqlAnalyzer.stmt.mssql;
using SharpSqlAnalyzer.stmt.mysql;
using SharpSqlAnalyzer.stmt.oracle;
using SharpSqlAnalyzer.stmt.postgresql;
using SharpSqlAnalyzer.stmt.sybase;
using SharpSqlAnalyzer.stmt.teradata;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x0200034F RID: 847
	public class TStatementSqlNode : TParseTreeNode
	{
		// Token: 0x17000745 RID: 1861
		// (get) Token: 0x060022F4 RID: 8948 RVA: 0x00335932 File Offset: 0x00333B32
		public virtual TCustomSqlStatement Stmt
		{
			get
			{
				return this.stmt;
			}
		}

		// Token: 0x17000746 RID: 1862
		// (set) Token: 0x060022F5 RID: 8949 RVA: 0x0033593A File Offset: 0x00333B3A
		public virtual bool Parsed
		{
			set
			{
				this.isParsed = value;
			}
		}

		// Token: 0x060022F6 RID: 8950 RVA: 0x00335943 File Offset: 0x00333B43
		public override void init(object arg1)
		{
			if (arg1 is TCustomSqlStatement)
			{
				this.stmt = (TCustomSqlStatement)arg1;
				return;
			}
			this.sqlNode = (TParseTreeNode)arg1;
		}

		// Token: 0x17000747 RID: 1863
		// (get) Token: 0x060022F8 RID: 8952 RVA: 0x0033596F File Offset: 0x00333B6F
		// (set) Token: 0x060022F7 RID: 8951 RVA: 0x00335966 File Offset: 0x00333B66
		public virtual TObjectName EndLabelName
		{
			get
			{
				return this.endlabelName;
			}
			set
			{
				this.endlabelName = value;
			}
		}

		// Token: 0x17000748 RID: 1864
		// (get) Token: 0x060022FA RID: 8954 RVA: 0x00335980 File Offset: 0x00333B80
		// (set) Token: 0x060022F9 RID: 8953 RVA: 0x00335977 File Offset: 0x00333B77
		public virtual TObjectName LabelName
		{
			get
			{
				return this.labelName;
			}
			set
			{
				this.labelName = value;
			}
		}

		// Token: 0x060022FB RID: 8955 RVA: 0x00335988 File Offset: 0x00333B88
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			this.labelName = (TObjectName)arg2;
		}

		// Token: 0x060022FC RID: 8956 RVA: 0x003359A0 File Offset: 0x00333BA0
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.stmt != null)
			{
				if (!this.isParsed)
				{
					this.stmt.parsestatement(psql, this.isParsed);
				}
				else
				{
					this.stmt.doParseStatement(psql);
				}
				if (this.stmt.LabelName == null)
				{
					this.stmt.LabelName = this.labelName;
				}
				this.stmt.EndLabelName = this.EndLabelName;
				return;
			}
			if (this.sqlNode == null)
			{
				return;
			}
			int nodeType = this.sqlNode.NodeType;
			if (nodeType <= 990)
			{
				if (nodeType <= 514)
				{
					if (nodeType <= 80)
					{
						if (nodeType != 41)
						{
							if (nodeType != 77)
							{
								if (nodeType == 80)
								{
									if (psql.dbvendor == EDbVendor.dbvdb2)
									{
										ESqlStatementType sqlStatementType = ((TStubStmtSqlNode)this.sqlNode).SqlStatementType;
										if (sqlStatementType <= ESqlStatementType.sstdb2iterate)
										{
											if (sqlStatementType == ESqlStatementType.sstdb2call)
											{
												this.stmt = new TDb2CallStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
											if (sqlStatementType == ESqlStatementType.sstdb2goto)
											{
												this.stmt = new TDb2GotoStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
											if (sqlStatementType == ESqlStatementType.sstdb2iterate)
											{
												this.stmt = new TDb2IterateStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
										}
										else
										{
											if (sqlStatementType == ESqlStatementType.sstdb2leave)
											{
												this.stmt = new TDb2LeaveStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
											if (sqlStatementType == ESqlStatementType.sstdb2set)
											{
												this.stmt = new TDb2SetStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
											if (sqlStatementType == ESqlStatementType.sstdb2signal)
											{
												this.stmt = new TDb2SignalStmt(EDbVendor.dbvdb2);
												goto IL_1346;
											}
										}
										this.stmt = new TDb2StmtStub(EDbVendor.dbvdb2);
										((TDb2StmtStub)this.stmt).sqlstatementtype = ((TStubStmtSqlNode)this.sqlNode).SqlStatementType;
									}
									else if (psql.dbvendor == EDbVendor.dbvmysql)
									{
										this.stmt = new TMySQLStmtStub(EDbVendor.dbvmysql);
										((TMySQLStmtStub)this.stmt).sqlstatementtype = ((TStubStmtSqlNode)this.sqlNode).SqlStatementType;
									}
								}
							}
							else
							{
								this.stmt = new TTruncateStatement(psql.dbvendor);
							}
						}
						else if (psql.dbvendor == EDbVendor.dbvdb2)
						{
							this.stmt = new TDb2CaseStmt(EDbVendor.dbvdb2);
						}
						else if (psql.dbvendor == EDbVendor.dbvmysql)
						{
							this.stmt = new TMySQLCaseStmt(EDbVendor.dbvmysql);
						}
					}
					else if (nodeType <= 357)
					{
						switch (nodeType)
						{
						case 100:
							this.stmt = new TSelectSqlStatement(psql.dbvendor);
							break;
						case 101:
							this.stmt = new TDeleteSqlStatement(psql.dbvendor);
							break;
						case 102:
							this.stmt = new TUpdateSqlStatement(psql.dbvendor);
							break;
						case 103:
							this.stmt = new TInsertSqlStatement(psql.dbvendor);
							break;
						case 104:
							this.stmt = new TCreateTableSqlStatement(psql.dbvendor);
							break;
						case 105:
							if (psql.dbvendor == EDbVendor.dbvoracle)
							{
								this.stmt = new TPlsqlCreateProcedure(EDbVendor.dbvoracle);
								((TPlsqlCreateProcedure)this.stmt).Kind = ((TCreateProcedureSqlNode)this.sqlNode).Kind;
							}
							else if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlCreateProcedure(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2CreateProcedure(psql.dbvendor);
							}
							else
							{
								Console.WriteLine("create procedure not implemented: " + psql.dbvendor.ToString());
							}
							break;
						case 106:
							if (psql.dbvendor == EDbVendor.dbvoracle)
							{
								this.stmt = new TPlsqlCreateFunction(EDbVendor.dbvoracle);
								((TPlsqlCreateFunction)this.stmt).Kind = ((TCreateFunctionSqlNode)this.sqlNode).Kind;
							}
							else if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlCreateFunction(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2CreateFunction(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvhive)
							{
								this.stmt = new THiveCreateFunction(psql.dbvendor);
							}
							else
							{
								Console.WriteLine("create function not implemented: " + psql.dbvendor.ToString());
							}
							break;
						case 107:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlBlock(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvoracle || psql.dbvendor == EDbVendor.dbvpostgresql || psql.dbvendor == EDbVendor.dbvteradata)
							{
								this.stmt = new TCommonBlock(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLBlock(psql.dbvendor);
							}
							else
							{
								Console.WriteLine("block type not implemented: " + psql.dbvendor.ToString());
							}
							break;
						case 108:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlReturn(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2ReturnStmt(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLReturn(psql.dbvendor);
							}
							break;
						case 109:
						case 110:
						case 111:
						case 114:
						case 115:
						case 117:
						case 118:
						case 122:
						case 133:
						case 134:
						case 136:
						case 138:
						case 139:
						case 140:
						case 141:
						case 142:
						case 143:
						case 144:
						case 145:
						case 146:
						case 147:
						case 148:
						case 149:
						case 150:
							break;
						case 112:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlIfElse(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2IfStmt(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLIfStmt(psql.dbvendor);
							}
							break;
						case 113:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlDeclare(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLDeclare(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								EDeclareType declareType = ((TDeclareSqlNode)this.sqlNode).DeclareType;
								if (declareType != EDeclareType.variable)
								{
									switch (declareType)
									{
									case EDeclareType.cursor:
										this.stmt = new TDb2DeclareCursorStatement(psql.dbvendor);
										break;
									case EDeclareType.conditions:
										this.stmt = new TDb2ConditionDeclaration(psql.dbvendor);
										break;
									case EDeclareType.handlers:
										this.stmt = new TDb2HandlerDeclaration(psql.dbvendor);
										break;
									case EDeclareType.statement:
										this.stmt = new TDb2StatementDeclaration(psql.dbvendor);
										break;
									case EDeclareType.returnCode:
										this.stmt = new TDb2ReturnCodesDeclaration(psql.dbvendor);
										break;
									}
								}
								else
								{
									this.stmt = new TDb2SqlVariableDeclaration(psql.dbvendor);
								}
							}
							break;
						case 116:
							this.stmt = new TCreateIndexSqlStatement(psql.dbvendor);
							break;
						case 119:
							this.stmt = new TDropTableSqlStatement(psql.dbvendor);
							break;
						case 120:
							this.stmt = new TDropIndexSqlStatement(psql.dbvendor);
							break;
						case 121:
							this.stmt = new TDropViewSqlStatement(psql.dbvendor);
							break;
						case 123:
							this.stmt = new TAlterTableStatement(psql.dbvendor);
							break;
						case 124:
							this.stmt = new TMergeSqlStatement(psql.dbvendor);
							break;
						case 125:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlContinue(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvoracle)
							{
								this.stmt = new TPlsqlContinue(psql.dbvendor);
							}
							break;
						case 126:
							this.stmt = new TMssqlBreak(psql.dbvendor);
							break;
						case 127:
							this.stmt = new TMssqlGrant(psql.dbvendor);
							break;
						case 128:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlFetch(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2FetchCursorStmt(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLFetchCursor(psql.dbvendor);
							}
							break;
						case 129:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlOpen(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2OpenCursorStmt(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvmysql)
							{
								this.stmt = new TMySQLOpenCursor(psql.dbvendor);
							}
							break;
						case 130:
							if (psql.dbvendor == EDbVendor.dbvmssql || psql.dbvendor == EDbVendor.dbvsybase)
							{
								this.stmt = new TMssqlClose(psql.dbvendor);
							}
							else if (psql.dbvendor == EDbVendor.dbvdb2)
							{
								this.stmt = new TDb2CloseCursorStmt(psql.dbvendor);
							}
							break;
						case 131:
							this.stmt = new TMssqlExecuteAs(psql.dbvendor);
							break;
						case 132:
							this.stmt = new TMssqlExecute(psql.dbvendor);
							break;
						case 135:
							this.stmt = new TMssqlDropDbObject(psql.dbvendor);
							break;
						case 137:
							this.stmt = new TCallStatement(psql.dbvendor);
							break;
						case 151:
							this.stmt = new TCreateDatabaseSqlStatement(psql.dbvendor);
							break;
						default:
							switch (nodeType)
							{
							case 355:
								this.stmt = new TAlterViewStatement(psql.dbvendor);
								break;
							case 356:
								this.stmt = new TAlterIndexStmt(psql.dbvendor);
								break;
							case 357:
								this.stmt = new TAlterDatabaseStmt(psql.dbvendor);
								break;
							}
							break;
						}
					}
					else if (nodeType != 364)
					{
						if (nodeType == 514)
						{
							this.stmt = new TPlsqlExecImmeStmt(EDbVendor.dbvoracle);
						}
					}
					else
					{
						this.stmt = new TDropSequenceStmt(psql.dbvendor);
					}
				}
				else if (nodeType <= 627)
				{
					if (nodeType != 552)
					{
						if (nodeType != 597)
						{
							switch (nodeType)
							{
							case 611:
								this.stmt = new TMssqlSet(psql.dbvendor);
								break;
							case 612:
								this.stmt = new TMssqlBeginTran(psql.dbvendor);
								break;
							case 613:
								this.stmt = new TMssqlRaiserror(psql.dbvendor);
								break;
							case 614:
								this.stmt = new TMssqlGoTo(psql.dbvendor);
								break;
							case 615:
								this.stmt = new TMssqlLabel(psql.dbvendor);
								break;
							case 616:
								this.stmt = new TMssqlDeallocate(psql.dbvendor);
								break;
							case 619:
								this.stmt = new TMssqlBeginDialog(psql.dbvendor);
								break;
							case 620:
								this.stmt = new TMssqlSendOnConversation(psql.dbvendor);
								break;
							case 621:
								this.stmt = new TMssqlEndConversation(psql.dbvendor);
								break;
							case 622:
								this.stmt = new TMssqlRevert(psql.dbvendor);
								break;
							case 625:
								this.stmt = new TMssqlBulkInsert(psql.dbvendor);
								break;
							case 626:
								this.stmt = new TMssqlUpdateText(psql.dbvendor);
								break;
							case 627:
								if (((TMssqlStmtStubSqlNode)this.sqlNode).SqlStatementType == ESqlStatementType.sstmssqlset)
								{
									this.stmt = new TMssqlSet(psql.dbvendor);
									this.stmt.startToken = this.sqlNode.startToken;
									this.stmt.endToken = this.sqlNode.endToken;
								}
								else
								{
									this.stmt = new TMssqlStmtStub(psql.dbvendor);
									((TMssqlStmtStub)this.stmt).sqlstatementtype = ((TMssqlStmtStubSqlNode)this.sqlNode).SqlStatementType;
								}
								break;
							}
						}
						else
						{
							this.stmt = new TCompoundTriggerBody(psql.dbvendor);
						}
					}
					else
					{
						this.stmt = new TCreateSynonymStmt(psql.dbvendor);
					}
				}
				else if (nodeType <= 913)
				{
					switch (nodeType)
					{
					case 714:
						this.stmt = new TMssqlSetRowCount(psql.dbvendor);
						break;
					case 715:
						break;
					case 716:
						this.stmt = new TMssqlThrow(psql.dbvendor);
						break;
					case 717:
						this.stmt = new TReconfigure(psql.dbvendor);
						break;
					case 718:
						this.stmt = new TMssqlCreateType(psql.dbvendor);
						break;
					default:
						if (nodeType == 913)
						{
							this.stmt = new TDb2ForStmt(EDbVendor.dbvdb2);
						}
						break;
					}
				}
				else
				{
					switch (nodeType)
					{
					case 919:
						if (psql.dbvendor == EDbVendor.dbvhive)
						{
							this.stmt = new THiveSet(EDbVendor.dbvhive);
						}
						else if (psql.dbvendor == EDbVendor.dbvmysql)
						{
							this.stmt = new TMySQLSet(EDbVendor.dbvmysql);
						}
						else
						{
							this.stmt = new TDb2SetVariableStmt(EDbVendor.dbvdb2);
						}
						break;
					case 920:
					case 922:
					case 924:
						break;
					case 921:
						if (psql.dbvendor == EDbVendor.dbvdb2)
						{
							this.stmt = new TDb2WhileStmt(EDbVendor.dbvdb2);
						}
						else if (psql.dbvendor == EDbVendor.dbvmysql)
						{
							this.stmt = new TMySQLWhileStmt(EDbVendor.dbvmysql);
						}
						break;
					case 923:
						if (psql.dbvendor == EDbVendor.dbvdb2)
						{
							this.stmt = new TDb2RepeatStmt(EDbVendor.dbvdb2);
						}
						else if (psql.dbvendor == EDbVendor.dbvmysql)
						{
							this.stmt = new TMySQLRepeatStmt(EDbVendor.dbvmysql);
						}
						break;
					case 925:
						if (psql.dbvendor == EDbVendor.dbvdb2)
						{
							this.stmt = new TDb2LoopStmt(EDbVendor.dbvdb2);
						}
						else if (psql.dbvendor == EDbVendor.dbvmysql)
						{
							this.stmt = new TMySQLLoopStmt(EDbVendor.dbvmysql);
						}
						break;
					default:
						if (nodeType == 990)
						{
							this.stmt = new TParseErrorSqlStatement(psql.dbvendor);
						}
						break;
					}
				}
			}
			else if (nodeType <= 1849)
			{
				if (nodeType <= 1107)
				{
					if (nodeType != 1000)
					{
						if (nodeType != 1105)
						{
							if (nodeType == 1107)
							{
								this.stmt = new TTeradataLock(psql.dbvendor);
							}
						}
						else
						{
							this.stmt = new TTeradataStmtStub(psql.dbvendor);
							((TTeradataStmtStub)this.stmt).sqlstatementtype = ((TTeradataStmtStubSqlNode)this.sqlNode).SqlStatementType;
						}
					}
					else
					{
						TDummy tdummy = (TDummy)this.sqlNode;
						if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqlcommit)
						{
							this.stmt = new TMssqlCommit(psql.dbvendor);
						}
						else if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqlrollback)
						{
							this.stmt = new TMssqlRollback(psql.dbvendor);
						}
						else if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqlsavetran)
						{
							this.stmt = new TMssqlSaveTran(psql.dbvendor);
						}
						else if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqlprint)
						{
							this.stmt = new TMssqlPrint(psql.dbvendor);
						}
						else if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqluse)
						{
							this.stmt = new TUseDatabase(psql.dbvendor);
						}
						else if (tdummy.sqlstatementtype == ESqlStatementType.sstmssqlgo)
						{
							this.stmt = new TMssqlGo(psql.dbvendor);
						}
					}
				}
				else if (nodeType <= 1843)
				{
					if (nodeType != 1268)
					{
						switch (nodeType)
						{
						case 1839:
							this.stmt = new THiveLoad(EDbVendor.dbvhive);
							break;
						case 1841:
							this.stmt = new THiveExportTable(EDbVendor.dbvhive);
							break;
						case 1843:
							this.stmt = new THiveImportTable(EDbVendor.dbvhive);
							break;
						}
					}
					else
					{
						this.stmt = new TMoveStmt(EDbVendor.dbvpostgresql);
					}
				}
				else if (nodeType != 1847)
				{
					if (nodeType == 1849)
					{
						this.stmt = new THiveDropDatabase(psql.dbvendor);
					}
				}
				else
				{
					this.stmt = new THiveSwitchDatabase(psql.dbvendor);
				}
			}
			else if (nodeType <= 1897)
			{
				switch (nodeType)
				{
				case 1861:
					this.stmt = new THiveDescribe(psql.dbvendor);
					break;
				case 1862:
				case 1864:
				case 1866:
				case 1868:
				case 1870:
				case 1872:
				case 1874:
					break;
				case 1863:
					this.stmt = new THiveShow(psql.dbvendor);
					break;
				case 1865:
					this.stmt = new THiveMetaStoreCheck(psql.dbvendor);
					break;
				case 1867:
					this.stmt = new THiveDropFunction(psql.dbvendor);
					break;
				case 1869:
					this.stmt = new THiveAnalyzeTable(psql.dbvendor);
					break;
				case 1871:
					this.stmt = new THiveLockTable(psql.dbvendor);
					break;
				case 1873:
					this.stmt = new THiveCreateRole(psql.dbvendor);
					break;
				case 1875:
					if (((THiveGrantSqlNode)this.sqlNode).Revoke)
					{
						this.stmt = new THiveRevoke(EDbVendor.dbvhive);
					}
					else
					{
						this.stmt = new THiveGrant(EDbVendor.dbvhive);
					}
					break;
				default:
					if (nodeType != 1887)
					{
						switch (nodeType)
						{
						case 1891:
							this.stmt = new THiveShowGrant(psql.dbvendor);
							break;
						case 1893:
							this.stmt = new THiveShowRoleGrant(psql.dbvendor);
							break;
						case 1895:
							if (((THiveGrantRoleSqlNode)this.sqlNode).Revoke)
							{
								this.stmt = new THiveRevokeRole(psql.dbvendor);
							}
							else
							{
								this.stmt = new THiveGrantRole(psql.dbvendor);
							}
							break;
						case 1897:
							this.stmt = new THiveFromQuery(EDbVendor.dbvhive);
							break;
						}
					}
					else
					{
						this.stmt = new THiveDropRole(psql.dbvendor);
					}
					break;
				}
			}
			else if (nodeType <= 2003)
			{
				if (nodeType != 2001)
				{
					if (nodeType == 2003)
					{
						this.stmt = new TSybaseUpdateIndexStatistics(EDbVendor.dbvsybase);
					}
				}
				else
				{
					this.stmt = new TSybaseDumpTran(EDbVendor.dbvsybase);
				}
			}
			else if (nodeType != 2007)
			{
				if (nodeType == 2009)
				{
					this.stmt = new TSybaseDeleteStatistics(EDbVendor.dbvsybase);
				}
			}
			else
			{
				this.stmt = new TSybaseWritetext(EDbVendor.dbvsybase);
			}
			IL_1346:
			if (this.stmt != null)
			{
				this.stmt.rootNode = this.sqlNode;
				this.stmt.startToken = this.sqlNode.startToken;
				this.stmt.endToken = this.sqlNode.endToken;
				this.stmt.LabelName = this.labelName;
				this.stmt.EndLabelName = this.EndLabelName;
				this.stmt.doParseStatement(psql);
			}
		}

		// Token: 0x04001B22 RID: 6946
		public const int caseExpression = 41;

		// Token: 0x04001B23 RID: 6947
		public const int stubStmtSqlNode = 80;

		// Token: 0x04001B24 RID: 6948
		public const int truncateTable = 77;

		// Token: 0x04001B25 RID: 6949
		public const int select = 100;

		// Token: 0x04001B26 RID: 6950
		public const int delete = 101;

		// Token: 0x04001B27 RID: 6951
		public const int update = 102;

		// Token: 0x04001B28 RID: 6952
		public const int insert = 103;

		// Token: 0x04001B29 RID: 6953
		public const int createtable = 104;

		// Token: 0x04001B2A RID: 6954
		public const int CreateProcedureSqlNode = 105;

		// Token: 0x04001B2B RID: 6955
		public const int CreateFunctionSqlNode = 106;

		// Token: 0x04001B2C RID: 6956
		public const int block = 107;

		// Token: 0x04001B2D RID: 6957
		public const int returnstmt = 108;

		// Token: 0x04001B2E RID: 6958
		public const int ifstmt = 112;

		// Token: 0x04001B2F RID: 6959
		public const int declare = 113;

		// Token: 0x04001B30 RID: 6960
		public const int CreateIndexSqlNode = 116;

		// Token: 0x04001B31 RID: 6961
		public const int DropTableSqlNode = 119;

		// Token: 0x04001B32 RID: 6962
		public const int DropIndexSqlNode = 120;

		// Token: 0x04001B33 RID: 6963
		public const int DropViewSqlNode = 121;

		// Token: 0x04001B34 RID: 6964
		public const int CreateSequenceSqlNode = 122;

		// Token: 0x04001B35 RID: 6965
		public const int AlterTableSqlNode = 123;

		// Token: 0x04001B36 RID: 6966
		public const int MergeSqlNode = 124;

		// Token: 0x04001B37 RID: 6967
		public const int ContinueSqlNode = 125;

		// Token: 0x04001B38 RID: 6968
		public const int BreakSqlNode = 126;

		// Token: 0x04001B39 RID: 6969
		public const int GrantSqlNode = 127;

		// Token: 0x04001B3A RID: 6970
		public const int FetchSqlNode = 128;

		// Token: 0x04001B3B RID: 6971
		public const int OpenSqlNode = 129;

		// Token: 0x04001B3C RID: 6972
		public const int CloseSqlNode = 130;

		// Token: 0x04001B3D RID: 6973
		public const int ExecuteAsSqlNode = 131;

		// Token: 0x04001B3E RID: 6974
		public const int ExecuteSqlNode = 132;

		// Token: 0x04001B3F RID: 6975
		public const int RevokeSqlNode = 133;

		// Token: 0x04001B40 RID: 6976
		public const int DropDbObjectSqlNode = 135;

		// Token: 0x04001B41 RID: 6977
		public const int CollectStatisticsSqlNode = 136;

		// Token: 0x04001B42 RID: 6978
		public const int callSqlNode = 137;

		// Token: 0x04001B43 RID: 6979
		public const int createDatabaseSqlNode = 151;

		// Token: 0x04001B44 RID: 6980
		public const int CreateSchemaSqlNode = 155;

		// Token: 0x04001B45 RID: 6981
		public const int DenySqlNode = 157;

		// Token: 0x04001B46 RID: 6982
		public const int alterViewSqlNode = 355;

		// Token: 0x04001B47 RID: 6983
		public const int alterIndexSqlNode = 356;

		// Token: 0x04001B48 RID: 6984
		public const int alterDatabaseSqlNode = 357;

		// Token: 0x04001B49 RID: 6985
		public const int dropSequenceSqlNode = 364;

		// Token: 0x04001B4A RID: 6986
		public const int ExecImmeNode = 514;

		// Token: 0x04001B4B RID: 6987
		public const int createSynonymSqlNode = 552;

		// Token: 0x04001B4C RID: 6988
		public const int OracleConstructorSpec = 585;

		// Token: 0x04001B4D RID: 6989
		public const int OracleConstructorBody = 587;

		// Token: 0x04001B4E RID: 6990
		public const int OracleCompoundTriggerBody = 597;

		// Token: 0x04001B4F RID: 6991
		public const int MssqlSetSqlNode = 611;

		// Token: 0x04001B50 RID: 6992
		public const int MssqlBeginTranSqlNode = 612;

		// Token: 0x04001B51 RID: 6993
		public const int MssqlRaiserrorSqlNode = 613;

		// Token: 0x04001B52 RID: 6994
		public const int MssqlGotoSqlNode = 614;

		// Token: 0x04001B53 RID: 6995
		public const int MssqlLabelSqlNode = 615;

		// Token: 0x04001B54 RID: 6996
		public const int MssqlDeallocateSqlNode = 616;

		// Token: 0x04001B55 RID: 6997
		public const int MssqlBeginDialogSqlNode = 619;

		// Token: 0x04001B56 RID: 6998
		public const int MssqlSendOnConversationSqlNode = 620;

		// Token: 0x04001B57 RID: 6999
		public const int MssqlEndConversationSqlNode = 621;

		// Token: 0x04001B58 RID: 7000
		public const int MssqlRevertSqlNode = 622;

		// Token: 0x04001B59 RID: 7001
		public const int MssqlBulkInsert = 625;

		// Token: 0x04001B5A RID: 7002
		public const int MssqlUpdateTextSqlNode = 626;

		// Token: 0x04001B5B RID: 7003
		public const int MssqlStmtStubSqlNode = 627;

		// Token: 0x04001B5C RID: 7004
		public const int MssqlSetRowCountSqlNode = 714;

		// Token: 0x04001B5D RID: 7005
		public const int MssqlThrowSqlNode = 716;

		// Token: 0x04001B5E RID: 7006
		public const int MssqlReconfigureSqlNode = 717;

		// Token: 0x04001B5F RID: 7007
		public const int MssqlCreateTypeSqlNode = 718;

		// Token: 0x04001B60 RID: 7008
		public const int ForSqlNode = 913;

		// Token: 0x04001B61 RID: 7009
		public const int SetSqlNode = 919;

		// Token: 0x04001B62 RID: 7010
		public const int WhileSqlNode = 921;

		// Token: 0x04001B63 RID: 7011
		public const int RepeatSqlNode = 923;

		// Token: 0x04001B64 RID: 7012
		public const int LoopSqlNode = 925;

		// Token: 0x04001B65 RID: 7013
		public const int ParseErrorNode = 990;

		// Token: 0x04001B66 RID: 7014
		public const int dummyNode = 1000;

		// Token: 0x04001B67 RID: 7015
		public const int dummyListNode = 1001;

		// Token: 0x04001B68 RID: 7016
		public const int TeradataStmtStubSqlNode = 1105;

		// Token: 0x04001B69 RID: 7017
		public const int T_TeradataUsingSqlNode = 1106;

		// Token: 0x04001B6A RID: 7018
		public const int T_TeradataLockSqlNode = 1107;

		// Token: 0x04001B6B RID: 7019
		public const int T_TeradataLockClause = 1108;

		// Token: 0x04001B6C RID: 7020
		public const int T_TeradataGiveSqlNode = 1109;

		// Token: 0x04001B6D RID: 7021
		public const int T_AbortSqlNode = 1110;

		// Token: 0x04001B6E RID: 7022
		public const int T_TeradataCreateMacroSqlNode = 1111;

		// Token: 0x04001B6F RID: 7023
		public const int moveSqlNode = 1268;

		// Token: 0x04001B70 RID: 7024
		public const int hiveLoadSqlNode = 1839;

		// Token: 0x04001B71 RID: 7025
		public const int hiveExportSqlNode = 1841;

		// Token: 0x04001B72 RID: 7026
		public const int hiveImportSqlNode = 1843;

		// Token: 0x04001B73 RID: 7027
		public const int hiveSwitchDBSqlNode = 1847;

		// Token: 0x04001B74 RID: 7028
		public const int hiveDropDBSqlNode = 1849;

		// Token: 0x04001B75 RID: 7029
		public const int hiveDescribeSqlNode = 1861;

		// Token: 0x04001B76 RID: 7030
		public const int hiveShowSqlNode = 1863;

		// Token: 0x04001B77 RID: 7031
		public const int hiveMetastoreCheckSqlNode = 1865;

		// Token: 0x04001B78 RID: 7032
		public const int hiveDropFunctionSqlNode = 1867;

		// Token: 0x04001B79 RID: 7033
		public const int hiveAnalyzeSqlNode = 1869;

		// Token: 0x04001B7A RID: 7034
		public const int hiveLockSqlNode = 1871;

		// Token: 0x04001B7B RID: 7035
		public const int hiveCreateRoleSqlNode = 1873;

		// Token: 0x04001B7C RID: 7036
		public const int hiveGrantSqlNode = 1875;

		// Token: 0x04001B7D RID: 7037
		public const int hiveDropRoleSqlNode = 1887;

		// Token: 0x04001B7E RID: 7038
		public const int hiveShowGrantSqlNode = 1891;

		// Token: 0x04001B7F RID: 7039
		public const int hiveShowRoleGrantSqlNode = 1893;

		// Token: 0x04001B80 RID: 7040
		public const int hiveGrantRoleSqlNode = 1895;

		// Token: 0x04001B81 RID: 7041
		public const int hiveFromQuerySqlNode = 1897;

		// Token: 0x04001B82 RID: 7042
		public const int sybaseDumpTranSqlNode = 2001;

		// Token: 0x04001B83 RID: 7043
		public const int sybaseUpdateIndexStatisticsSqlNode = 2003;

		// Token: 0x04001B84 RID: 7044
		public const int sybaseInsertBulkSqlNode = 2005;

		// Token: 0x04001B85 RID: 7045
		public const int sybaseWritetextSqlNode = 2007;

		// Token: 0x04001B86 RID: 7046
		public const int sybaseDeleteStatisticsSqlNode = 2009;

		// Token: 0x04001B87 RID: 7047
		public const int TCreateUserSqlNode = 2100;

		// Token: 0x04001B88 RID: 7048
		public const int TTriggerEventClause = 2101;

		// Token: 0x04001B89 RID: 7049
		public const int TTriggerEventItem = 2102;

		// Token: 0x04001B8A RID: 7050
		public const int TDmlEventItem = 2103;

		// Token: 0x04001B8B RID: 7051
		public const int TCreateFunctionOption = 2014;

		// Token: 0x04001B8C RID: 7052
		public const int TAlterFunctionSqlNode = 2015;

		// Token: 0x04001B8D RID: 7053
		public const int TCopyIntoNode = 2020;

		// Token: 0x04001B8E RID: 7054
		public const int TAlterSchemaSqlNode = 2021;

		// Token: 0x04001B8F RID: 7055
		public const int TDropFunctionSqlNode = 2022;

		// Token: 0x04001B90 RID: 7056
		public const int TDropDatabaseSqlNode = 2023;

		// Token: 0x04001B91 RID: 7057
		public const int TCreateTableOption = 2030;

		// Token: 0x04001B92 RID: 7058
		private TParseTreeNode sqlNode;

		// Token: 0x04001B93 RID: 7059
		private TCustomSqlStatement stmt;

		// Token: 0x04001B94 RID: 7060
		private bool isParsed = true;

		// Token: 0x04001B95 RID: 7061
		private TObjectName endlabelName;

		// Token: 0x04001B96 RID: 7062
		private TObjectName labelName;
	}
}
